
testOptimizations([
	['a(); b();',
		'a(), b();'],
	
	['if (a) { b(); c(); }',
		'a && (b(), c());'],
	
	['throw 1, 2;',
		'throw 2;'],
	
	['!a()',
		'a();'],
	
	['a() + b()',
		'a(), b();'],
	
	['a() - b();',
		'a(), b();'],
	
	// we can't remove this operator because it is short-circuiting and the result would not be the same
	['a() && b();',
		'a() && b();'],
	
	// we can't remove this operator because it has side effects
	['++a().b',
		'++a().b;'],
	
	['a().b--',
		'a().b--;'],
	
	// inside a list of expressions - remove useless operator
	['!a(), b();',
		'a(), b();'],
	
	// at the end of a list of expressions - preserve operator
	['x = (a(), !b());',
		'x = (a(), !b());'],
	
	// at the end of a list of expressions when the list's result is not used - remove
	['a(), !b();',
		'a(), b();'],
	
	['a = c(); if (b()) a = d();',
		'a = c(), b() && (a = d());']
]);
